package ch.zbw.timeline.presentation;

import ch.zbw.timeline.domain.Allocation;
import ch.zbw.timeline.domain.DailyPresence;
import ch.zbw.timeline.domain.Employee;
import ch.zbw.timeline.domain.Entry;
import ch.zbw.timeline.domain.HolidayFormula;
import ch.zbw.timeline.domain.OverTimePool;
import ch.zbw.timeline.domain.Period;
import ch.zbw.timeline.domain.Process;
import ch.zbw.timeline.domain.Task;
import ch.zbw.timeline.domain.YearConfig;

/**
 * Interface for the client presenter which represents the listener
 * for the view (Model-View-Presenter pattern)
 * 
 * @author Daniel Stefanovic
 * @version 26.01.2012
 * 
 */
public interface ClientEventListener {

	/**
	 * Handling the login button click event
	 */
	public void loginButtonPressed();
	
	/**
	 * Handling the print button click event
	 */
	public void printButtonPressed();
	
	/**
	 * Handling the previous day button click event
	 */
	public void previousDayPressed();
	

	/**
	 * Handling the next day click event
	 */
	public void nextDayPressed();


	/**
	 * Loads the administration view
	 */
	public void loadAdministration();


	/**
	 * Handling the new employee button click event
	 */
	public void newEmployeeButtonPressed();


	/**
	 * Handling the edit employee button click event
	 */
	public void editEmployeeButtonPressed();

	/**
	 * Handling the change password button click event
	 */
	public void changePasswordButtonPressed();

	/**
	 * Handling the reset password button click event
	 * @param employee employee
	 */
	public void resetPasswordButtonPressed(Employee employee);

	/**
	 * Handling the save employee button click event
	 * 
	 * @param editMode edit mode of the employee
	 * @param employee mentioned employee
	 */
	public void saveEmployeeButtonPressed(boolean editMode, Employee employee);

	/**
	 * Handling the new process button click event
	 */
	public void newProcessButtonPressed();

	/**
	 * Handling the edit process button click event
	 */
	public void editProcessButtonPressed();

	/**
	 * Handling the save process button click event
	 * 
	 * @param editMode edit mode of the process
	 * @param process mentioned process
	 */
	public void saveProcessButtonPressed(boolean editMode, Process process);

	/**
	 * Handling the save task button click event
	 * 
	 * @param editMode edit mode of the task
	 * @param task mentioned task
	 */
	public void saveTaskButtonPressed(boolean editMode, Task task);

	/**
	 * Handling the edit task button click event
	 */
	public void editTaskButtonPressed();

	/**
	 * Handling the new task button click event
	 */
	public void newTaskButtonPressed();

	/**
	 * Handling the save allocation button click event
	 * 
	 * @param editMode edit mode of the allocation
	 * @param allocation mentioned allocation
	 */
	public void saveAllocationButtonPressed(boolean editMode, Allocation allocation);

	/**
	 * Handling the edit allocation button click event
	 */
	public void editAllocationButtonPressed();

	/**
	 * Handling the new allocation button click event
	 */
	public void newAllocationButtonPressed();

	/**
	 * Handling the save holiday formula button click event 
	 * 
	 * @param editMode edit mode of the holidayFormula
	 * @param holidayFormula mentioned holidayFormula
	 */
	public void saveHolidayFormulaButtonPressed(boolean editMode, HolidayFormula holidayFormula);

	/**
	 * Handling the edit holiday formula button click event
	 */
	public void editHolidayFormulaButtonPressed();

	/**
	 * Handling the new holiday formula button click event
	 */
	public void newHolidayFormulaButtonPressed();

	/**
	 * Handling the save over time pool button click event
	 * 
	 * @param editMode edit mode of the over time pool
	 * @param overTimePool mentioned over time pool
	 */
	public void saveOverTimePoolButtonPressed(boolean editMode, OverTimePool overTimePool);

	/**
	 * Handling the edit over time pool button click event
	 */
	public void editOverTimePoolButtonPressed();

	/**
	 * Handling the new over time pool button click event
	 */
	public void newOverTimePoolButtonPressed();

	/**
	 * Loads the current log file
	 */
	public void loadLog();

	/**
	 * Loads the given year
	 * 
	 * @param year mentioned year
	 */
	public void loadYear(int year);

	/**
	 * Saves the given yearConfig
	 * 
	 * @param yearConfig mentioned yearConfig
	 */
	public void saveYearConfig(YearConfig yearConfig);

	/**
	 * Loads the detail information from the given over time pool
	 * 
	 * @param overTimePool mentioned over time pool
	 */
	public void loadOverTimePoolDetailInformation(OverTimePool overTimePool);

	/**
	 * Saves the given daily presence
	 * 
	 * @param dailyPresence mentioned daily presence
	 */
	public void saveDailyPresence(DailyPresence dailyPresence);

	/**
	 * updates the given daily presence	
	 * 
	 * @param dailyPresence mentioned daily presence
	 */
	public void updatePresenceTime(DailyPresence dailyPresence);

	/**
	 * Handling the presence time changed
	 * 
	 * @param presence mentioned presence
	 */
	public void presenceTimeChanged(DailyPresence presence);

	/**
	 * Handling the new entry button click event
	 * 
	 * @param dailyPresence mentioned daily presence
	 */
	public void newEntryButtonPressed(DailyPresence dailyPresence);

	/**
	 * Creates a new entry with the given parameters
	 * 
	 * @param duration duration of the new entry 
	 * @param allocation allocation that belongs to the entry
	 * @param comment comment of the new entry
	 * @param overTimePool over time pool of the new entry
	 */
	public void createEntry(double duration, Allocation allocation, String comment, boolean overTimePool);

	/**
	 * Handling the delete entry button click event
	 * 
	 * @param entry mentioned entry
	 */
	public void deleteEntryButtonPressed(Entry entry);

	/**
	 * Handling the edit entry button click event
	 * 
	 * @param dailyPresence mentioned daily presence
	 * @param entry mentioned entry
	 */
	public void editEntryButtonPressed(DailyPresence dailyPresence, Entry entry);

	/**
	 * Saves the given entry
	 * 
	 * @param entry mentioned entry
	 * @param overTimePool over time pool of the entry
	 */
	public void saveEntry(Entry entry, boolean overTimePool);

	/**
	 * Loads the statistic with the given year and period from the given employee
	 * 
	 * @param employee mentioned employee
	 * @param year year in which the statistic should be loaded
	 * @param period period in which the statistic should be loaded
	 */
	public void loadStatistic(Employee employee, int year, Period period);

	/**
	 * Loads the periods of the given year
	 * 
	 * @param year mentinoed year
	 */
	public void loadPeriods(int year);

	/**
	 * Initiates the statistic from the given year
	 * 
	 * @param year mentioned year
	 */
	void initStatistic(int year);
	
}
